package com.blog.controller;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.GetMapping;


/**
 *
 * 基础路径控制类
 * @author cgx
 * @Date 2021/8/15 19:35
 */

@Controller
public class IndexController {

    /**
     * 首页跳转
     */
    @GetMapping({"/","/index"})
    public String index(){
        return "article/article-index";
    }
    /**
     * 登录页跳转
     */
    @GetMapping("/login")
    public String login(){
        return "user/login";
    }
    /**
     * 注册页跳转
     */
    @GetMapping("/register")
    public String register(){
        return "user/register";
    }
    /**
     * 后台页跳转
     */
    @GetMapping("/admin")
    public String amdin(){
        return "admin/index";
    }


    @GetMapping("/user/editPerson")
    public String editPersonInformation(){
        return "home/user/editPerson";
    }

    @GetMapping("/user/address/tree")
    public String userAddressTree(){
        return "home/user/addressTree";
    }

    @GetMapping("/place/findFellow")
    public String toFindFellow(){
        return "place/findFellow";
    }

    @GetMapping("/place/addPlace")
    public String toAddPlace(){
        return "place/addPlace";
    }

    /**
     * 无权限页跳转
     */
    @GetMapping("/noAuth")
    public String noAuth(){
        return "error/403";
    }
    /**
     * 地点新增页面跳转
     * @return String
     */
    @GetMapping("/place/add")
    public String placeAdd(){
        return "place/place/add";
    }

    /**
     * 添加地点右侧默认页面
     * @return String
     */
    @GetMapping("/place/default")
    public String placeDefault(){
        return "place/place/default";
    }

    @GetMapping("/place/countryInformation")
    public String countryData(){
        return "place/place/countryDefault";
    }

    @GetMapping("/place/provinceInformation")
    public String provinceData(){
        return "place/place/provinceDefault";
    }

    @GetMapping("/place/cityInformation")
    public String cityData(){
        return "place/place/cityDefault";
    }

    @GetMapping("/place/areaInformation")
    public String areaData(){
        return "place/place/areaDefault";
    }


    /**
     * 主页模板一跳转
     */
    @GetMapping("/page/welcome1")
    public String pageWelcome1(){
        return "page/welcome-1";
    }
    /**
     * 主页模板二跳转
     */
    @GetMapping("/page/welcome2")
    public String pageWelcome2(){
        return "page/welcome-2";
    }
    /**
     * 主页模板三跳转
     */
    @GetMapping("/page/welcome3")
    public String pageWelcome3(){
        return "page/welcome-3";
    }
    /**
     * 菜单管理页跳转
     */
    @GetMapping("/admin/system/menu/menu-index")
    public String pageMenu(){
        return "admin/system/menu/menu-index";
    }

    /**
     * 系统设置页跳转
     */
    @GetMapping("/page/setting")
    public String pageSetting(){
        return "page/setting";
    }


    @GetMapping("/admin/user/user-index")
    public String pageUserTable(){
        return "admin/user/user-index";
    }

    @GetMapping("user/setting")
    public String userSetting(){
        return "admin/user/user-setting";
    }

    @GetMapping("/admin/user/address")
    public String userAddress(){
        return "admin/user/user-address";
    }

    @GetMapping("admin/system/place/place-index")
    public String sysPlaceIndex(){
        return "admin/system/place/place-index";
    }

    @GetMapping("admin/system/cache/cache-index")
    public String sysCacheIndex(){
        return "admin/system/cache/cache-index";
    }

    @GetMapping("admin/article/article-index")
    public String articleList(){
        return "admin/article/article-index";
    }

    @GetMapping("admin/article/category-index")
    public String articleCategory(){
        return "admin/article/category/category-index";
    }

    @GetMapping("admin/article/comment-index")
    public String articleComment(){
        return "admin/article/comment/comment-index";
    }


    @GetMapping("admin/article/favor-index")
    public String articleFavor(){
        return "admin/article/favor/favor-index";
    }

    @GetMapping("/index/articleDraft")
    public String toArticleDraft(){
        return "article/draft-index";
    }

    @GetMapping("article/filter-comments")
    public String toFilterComments(){
        return "admin/article/sensitive/sensitive-index";
    }

    @GetMapping("admin/system/role/role-index")
    public String toAdminRoleIndex(){
        return "admin/system/role/role-index";
    }

    @GetMapping("/role/admin/role-add")
    public String addRole(){
        return "admin/system/role/role-add";
    }

    @GetMapping("/admin/system/operation-index")
    public String userOperation(){
        return "admin/system/operation/operation-index";
    }
}
